
sum = 1
for i in range(3, 1002, 2):
    for j in range(i**2, (i-2)**2 , 1-i):
        sum += j
print sum
